<!DOCTYPE html>
<html>
<head>
    <include file="Public/head"/>

    <link href="__CSS__/main.css" rel="stylesheet" type="text/css" />
    <link href="__CSS__/index.css" rel="stylesheet" type="text/css" />

    <style>
        #page{
            transition: all .5s;
        }
        #nav{
            transition: all .5s;
        }
    </style>
</head>
<body>
<div id="page" style="right: 0px; width: 100%; top:0;display: block;">
    <div style="position:fixed; top:0; width:100%;">
    <header id="header" style="z-index:1">
        <div class="header_l"> <a class="ico_10" href="/"> 返回 </a> </div>
        <div id="search_box2" >
            <div class="search_box" >
                <form method="get" action="{:U('Goods/index',array('category'=>I('category','')))}" name="searchForm" id="searchForm_id">
                    <input placeholder="请输入商品名称" name="title" type="text" id="keywordBox" value="{:I('title')}"/>
                    <button class="ico_07" type="submit" onclick="return check('keywordBox')"> </button>
                </form>
            </div>
        </div>
        <div class="header_r header_search"> <a class="switchBtn switchBtn-album" href="javascript:void(0);"  onclick="showCate()" style="opacity: 1;"> 切换 </a> </div>
    </header>
    <div class="filter" style="position:static; top:0px; width:100%;">
        <ul class="filter-inner">
            <li class="{:$_GET['active']=='view'||$_GET['active']==''?'filter-cur':''}"> <a href="{:U('Goods/index',array('title'=>I('title'),'view'=>'desc','active'=>'view','category'=>I('category',''),'position'=>I('position')))}">人气</a> </li>
            <li class="{$_GET['active']=='sales'?'filter-cur':''}"> <a href="{:U('Goods/index',array('title'=>I('title'),'sales'=>$_GET['sales']!='desc'?'desc':'asc','active'=>'sales','category'=>I('category',''),'position'=>I('position')))}">销量<i class="{$_GET['sales']!='asc'?'f-ico-arrow-d':'f-ico-arrow-u'}"></i></a> </li>
            <li class="{$_GET['active']=='price_order'?'filter-cur':''}"> <a href="{:U('Goods/index',array('title'=>I('title'),'price_order'=>$_GET['price_order']!='desc'?'desc':'asc','active'=>'price_order','category'=>I('category',''),'position'=>I('position')))}">价格<i class="{$_GET['price_order']!='asc'?'f-ico-arrow-d':'f-ico-arrow-u'}"></i></a></li>
            <li class="{$_GET['active']=='created_time'?'filter-cur':''}"> <a href="{:U('Goods/index',array('title'=>I('title'),'created_time'=>$_GET['created_time']!='desc'?'desc':'asc','active'=>'price_order','active'=>'created_time','category'=>I('category',''),'position'=>I('position')))}">上新</a> </li>
        </ul>
    </div>
    </div>
    <div style="height:90px;"></div>
    <volist name="goodss" id="goods" >
        <a href="{:U('Goods/detail',array('id'=>$goods['id']))}">
            <div class="result">
                <img src="http://{:C('DOMAIN')}{:get_item_imgs($goods['multimage'],1,'path')['path']}" style="width:25%;" />
                <div class="result-infor">
                    <p><!--span class="new">新品</span-->{$goods.title}</p>
                    <p ><span class="color-red" style="float:left;">￥{$goods.price}</span><span class="fr" style="float:right;">{$goods.sales}件已售</span></p>
                    <p class="color-good">
                        <!--吉林地区包邮-->
                        </p>
                </div>
            </div>
        </a>
    </volist>

    <include file="Public/bottom"/>

</div>
<div id="nav" class="nav" style="right:-275px;margin-top:0;">
    <form class="hold-height" action="category.php">
        <div class="attrExtra">
            <div class="attrKey" style="font-size: 20px;width: 100%;text-align: center;">分类</div>
        </div>
        <div class="attrs attr-fix" style="overflow: auto;height: 100%">
            <div class="attr brandAttr">
                <div class="attrValues">
                    <ul class="av-collapse filter_list">
                        <li style="width: 14.59rem;">
                            <a href="{:U('Goods/index')}" data="10">全部分类</a>
                        </li>
                        <volist name="categorys" id="cate">
                            <li>
                                <a href="{:U('Goods/index',array('category'=>$cate['id']))}" data="10">{$cate.title}</a>
                            </li>
                        </volist>
                    </ul>
                </div>
            </div>

        </div>
    </form>
</div>
<script type="text/javascript" src="__JS__/jquery.min.js"></script>
<script type="text/javascript" src="__JS__/jquery.more.js"></script>
<script type="text/javascript" src="__JS__/ectouch.js"></script>
<script type="text/javascript">
    function showCate(){
        console.log("点击了");
        console.log($("#nav").css("right"));
        if($("#nav").css("right") == "-275px"){
            $("#nav").css("right",0);
            $("#page").css("left",-275);
        }else{
            $("#nav").css("right",-275);
            $("#page").css("left",0);
        }
    }
</script>
</body>
</html>